import os
basedir = os.path.abspath(os.path.dirname(__file__))

HOSTNAME = '127.0.0.1'  # 连接数据库地址
DATABASE = 'test'  # 数据库
PORT = 3306  # 端口
USERNAME = 'root'  # 用户名和密码
PASSWORD = '123456'

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'yunshangzhaji'
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(USERNAME,PASSWORD,HOSTNAME,PORT,DATABASE)
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    POSTS_PER_PAGE=3
